package com.project.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.bean.SellOrderBean;
import com.project.service.ISellInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;

@RequestMapping("sellInfo")
@RestController
public class SellInfoController {
    @Autowired
    private ISellInfoService sellInfoService;

    @RequestMapping("findByItem")
    public IPage<SellOrderBean> findByItem(Integer pageNO, String customerName, LocalDate startDate, LocalDate endDate){
        return  sellInfoService.findByItem(pageNO, customerName, startDate, endDate);
    }

    @RequestMapping("findById")
    public  SellOrderBean findById(Integer sellOrderId){
        return sellInfoService.findById(sellOrderId);
    }

}
